Telegram Group & Telegram Channel
Лимит рекурсии

В Python не поддерживается хвостовая рекурсия, из-за чего зачастую возникает RecursionError во время создания рекурсивных алгоритмов. Но с помощью модуля sys можно посмотреть и даже изменить максимальную глубину рекурсии.

Однако делать это слегка опасно, так как каждый новый вызов занимает достаточно много памяти. И вообще лучше стараться использовать не рекурсию, а обычные циклы.

#рекурсия #sys



tg-me.com/python_academy/834
Create:
Last Update:

Лимит рекурсии

В Python не поддерживается хвостовая рекурсия, из-за чего зачастую возникает RecursionError во время создания рекурсивных алгоритмов. Но с помощью модуля sys можно посмотреть и даже изменить максимальную глубину рекурсии.

Однако делать это слегка опасно, так как каждый новый вызов занимает достаточно много памяти. И вообще лучше стараться использовать не рекурсию, а обычные циклы.

#рекурсия #sys

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/834

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

How Does Bitcoin Mining Work?

Bitcoin mining is the process of adding new transactions to the Bitcoin blockchain. It’s a tough job. People who choose to mine Bitcoin use a process called proof of work, deploying computers in a race to solve mathematical puzzles that verify transactions.To entice miners to keep racing to solve the puzzles and support the overall system, the Bitcoin code rewards miners with new Bitcoins. “This is how new coins are created” and new transactions are added to the blockchain, says Okoro.

Tata Power whose core business is to generate, transmit and distribute electricity has made no money to investors in the last one decade. That is a big blunder considering it is one of the largest power generation companies in the country. One of the reasons is the company's huge debt levels which stood at ₹43,559 crore at the end of March 2021 compared to the company’s market capitalisation of ₹44,447 crore.

Python Academy from ye


Telegram Python Academy
FROM USA